package beans.impl;

import beans.Product;
import beans.ProductStore;
import java.util.ArrayList;
//import javax.persistence.Entity;
//import javax.persistence.EntityManager;
//import javax.persistence.Id;
//import javax.persistence.ManyToMany;
//import javax.persistence.ManyToOne;
//import javax.persistence.OneToMany;
//import javax.persistence.OneToOne;
//import javax.persistence.PrimaryKeyJoinColumn;
//import javax.persistence.SecondaryTable;
//import javax.persistence.Table;
import javax.persistence.Table;


/**
 * Magasin
 * @author M2 MIAGE Apprentissage - Groupe 3 (FKovacs)
 */
@Table(name="Store")
public class ProductStoreBean implements java.io.Serializable, ProductStore{

    private int storeId; //Id unique du magasin
    private String name;
    private ArrayList<Product> productList; //Liste des produits vendus dans le magasin
    private AccountBean account; //Compte du magasin
    private String city;

    public ProductStoreBean() {}

    public ProductStoreBean(int storeId, String city, AccountBean account, String name) {
        this.storeId = storeId;
        this.name = name;
        this.city = city;
        this.account = account;
    }

    public ArrayList<Product> getProducts() {
        return productList;
    }

    public String getName() {
        return name;
    }

    public int getReference() {
        return storeId;
    }
    public void setReference(int storeId) {
        this.storeId = storeId;
    }

    public String getAccountId() {
        return account.getAccountId();
    }

    /**
     * @return the city
     */
    public String getCity() {
        return city;
    }

    /**
     * @param city the city to set
     */
    public void setCity(String city) {
        this.city = city;
    }

}
